home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / overview / dtscpluslibrary / headers / toolbox.h < prev    next >
Encoding:
Text File  |  2000-09-28  |  3.0 KB  |  117 lines

  1. /*
  2.     File:        Toolbox.h
  3.  
  4.     Contains:    TToolbox is a Toolbox utility class, used for initialization and Toolbox functions.
  5.                   TToolbox.h contains the header file information for the Toolbox class construction.
  6.  
  7.  
  8.     Written by: Kent Sandvik    
  9.  
  10.     Copyright:    Copyright © 1992-1999 by Apple Computer, Inc., All Rights Reserved.
  11.  
  12.                 You may incorporate this Apple sample source code into your program(s) without
  13.                 restriction. This Apple sample source code has been provided "AS IS" and the
  14.                 responsibility for its operation is yours. You are not permitted to redistribute
  15.                 this Apple sample source code as "Apple sample source code" after having made
  16.                 changes. If you're going to re-distribute the source, we require that you make
  17.                 it clear in the source that the code was descended from Apple sample source
  18.                 code, but that you've made changes.
  19.  
  20.     Change History (most recent first):
  21.                 8/18/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  22.                 
  23.  
  24. */
  25. // Declare label for this header file
  26. #ifndef _TOOLBOX_
  27. #define _TOOLBOX_
  28.  
  29. #ifndef _DTSCPLUSLIBRARY_
  30. #include "DTSCPlusLibrary.h"
  31. #endif
  32.  
  33.  
  34. //    TOOLBOX INCLUDES
  35. #ifndef __TYPES__
  36. #include <Types.h>
  37. #endif
  38.  
  39. #ifndef __QUICKDRAW__
  40. #include <Quickdraw.h>
  41. #endif
  42.  
  43. #ifndef __FONTS__
  44. #include <Fonts.h>
  45. #endif
  46.  
  47. #ifndef __WINDOWS__
  48. #include <Windows.h>
  49. #endif
  50.  
  51. #ifndef __MENUS__
  52. #include <Menus.h>
  53. #endif
  54.  
  55. #ifndef __TEXTEDIT__
  56. #include <TextEdit.h>
  57. #endif
  58.  
  59. #ifndef __DIALOGS__
  60. #include <Dialogs.h>
  61. #endif
  62.  
  63. #ifndef __EVENTS__
  64. #include <Events.h>
  65. #endif
  66.  
  67. #ifndef __MEMORY__
  68. #include <Memory.h>
  69. #endif
  70.  
  71. #ifndef __OSUTILS__
  72. #include <OSUtils.h>
  73. #endif
  74.  
  75. #ifndef __GESTALTEQU__
  76. #include <GestaltEqu.h>
  77. #endif
  78.  
  79.  
  80. const short kDefaultPulls = 3;                    // define how many times we want to toggle until we are frontmost app.
  81. const short kDefaultMasterPointers = 8;            // default amount of Master pointers generated originally
  82.  
  83. // _________________________________________________________________________________________________________ //
  84. //    Class Interface
  85. class TToolbox
  86. // The TToolbox class is a simple toolbox initialization class, TToolbox.Initialize
  87. // should do most of the needed work inside an appplication when the application starts.
  88. // TToolbox also contains environment testing code (traps, system, functions).
  89. {
  90. public:
  91.     //    CONSTRUCTORS & DESTRUCTORS
  92.     TToolbox();                                    // various constructors, delete if not needed
  93.     virtual~ TToolbox();                        // virtual destructor
  94.  
  95.     //    INITIATION ROUTINES                            
  96.     virtual void Initialize();                    // standard initialization routine
  97.  
  98.     //    MAIN INTERFACE
  99.     virtual void InitializeToolbox();            // initialize Toolbox
  100.     virtual void PullApplicationToFront(short nCount = kDefaultPulls);// pull application to front
  101.     virtual Boolean CreateMasterPointers(short nMasterPtr = kDefaultMasterPointers);// create master pointers
  102. };
  103.  
  104.  
  105. #endif
  106.  
  107. // _________________________________________________________________________________________________________ //
  108.  
  109.  
  110. /*    Change History (most recent last):
  111.   No        Init.    Date        Comment
  112.   1            khs        6/6/92        New file
  113.   2            khs        1/3/93        Cleanup
  114. */
  115.  
  116.  
  117.